{template header common}
<script type="text/javascript" src="{__ROOT__}statics/js/haidao.validate.js?v={HD_VERSION}"></script>
	<div class="mui-content">
	    <div class="padding bg-white login-wrap">
	    	<form class="padding-small" action="{url('login')}" method="POST" name="login_form">
	    		<!--<div class="login-error"><span>用户名或密码错误！</span></div>-->
		        <div class="list">
		        	<input type="text" class="input" name="username" placeholder="用户名/手机号/邮箱" datatype="s2-15|mobile|email" nullmsg="请输入用户名/邮箱/手机号" errmsg="格式不正确">
		        </div>
		        <div class="list">
		        	<input type="password" class="input" name="password" placeholder="密码" datatype="*" nullmsg="请输入密码" />
		        </div>
		        <input type="submit" class="mui-btn full" value="登录" />
		        <a class="mui-btn full margin-top margin-bottom mui-btn-danger" href="{url('register',array('url_forward'=>$_GET['url_forward']))}">还没有账号？注册</a>
		        <div class="mui-clearfix">
		        	<input type="hidden" name="url_forward" value="{$_GET[url_forward]}">
		        	<label class="mui-pull-left text-gray"><input type="checkbox" checked="checked" /> 记住登录</label>
					<a class="mui-pull-right text-gray" href="{url('member/public/forget_password')}">忘记密码？</a>
				</div>
		    </form>
	    </div>
	    {hook/wap_login_footer}
	</div>
	{template footer common}
    <script>
    	//弹窗提示，在验证返回结果后调用
    	//$.tips({content:"登录成功！"});
		var login = $("form[name=login_form]").Validform({
			showAllError:true,
			ajaxPost:true,
			callback:function(ret) {
				if(ret.status == 0) {
					$.tips({
						icon:'error',
						content:ret.message,
						callback:function() {
							return false;
						}
					});
				} else {
					$.tips({
						icon:'success',
						content:ret.message,
						callback:function(){
							window.location.href = ret.referer;
						}
					});
				}
			}
		})
		mui(".other-login").on('tap','.login-item',function(){
			var login_code = $(this).attr("login-code");
			$.post("plugin.php?id=login:third_login",{login_code:login_code},function(ret){
				if (ret.status != 1) {
					$.tips({
						content:ret.message,
						callback:function() {
							return false;
						}
					});
				} else {
					window.location.href = ret.referer;
				}
			},"json")
		})
    </script>
</body>
</html>